package edu.sctu.zhuyingzhi.month201505.day20150504.exception.customException;
import java.util.Scanner;

/**
 * Created by user13 on 2015/5/4.
 */
public class Main {

     static void check(int i) throws Custom{
        if (i>100)
            throw new Custom(i);
         else
            System.out.println("He is legal");
    }

    public static void main(String[] args){
        Scanner in=new Scanner(System.in);
        int i;
        System.out.println("please input a value to judge it：");
        i=in.nextInt();
        try {
                check(i);
    }catch(Custom e){
            System.out.println("Catch an exception");
        }
    }
}
